package controllers

import (
	"github.com/beego/beego/v2/server/web"
	"backend/constants/errorCode"
)

type ErrorController struct {
	web.Controller
}

func (c *ErrorController) Error401() {
	result := errorCode.Err401
	c.Data["json"] = &result
	err := c.ServeJSON()
	if err != nil {
		return
	}
}

func (c *ErrorController) Error403() {
	result := errorCode.Err403
	c.Data["json"] = &result
	err := c.ServeJSON()
	if err != nil {
		return
	}
}
func (c *ErrorController) Error404() {
	result := errorCode.Err404
	c.Data["json"] = &result
	err := c.ServeJSON()
	if err != nil {
		return
	}
}

func (c *ErrorController) Error501() {
	result := errorCode.Err501
	c.Data["json"] = &result
	err := c.ServeJSON()
	if err != nil {
		return
	}
}

func (c *ErrorController) Error503() {
	result := errorCode.Err503
	c.Data["json"] = &result
	err := c.ServeJSON()
	if err != nil {
		return
	}
}

